import request from '@/utils/request';

/**
 * 获取课程列表
 */
export const fetchSubjectList = async (data: {} = {}, params: {} = {}) =>
  request('/student/education/subject/list', {
    data,
    params,
  });
/**
 * 做题记录
 */
 export const exampaperList = async (data: {} = {}, params: {} = {}) =>
 request('/student/exampaper/answer/pageList', {
   data,
   params,
 });
 /**
 * 错题记录
 */
  export const questionErrorList = async (data: {} = {}, params: {} = {}) =>
  request('/student/question/answer/page', {
    data,
    params,
  });

 /**
 * 错题反馈
 */
  export const messageSend = async (data: {} = {}, params: {} = {}) =>
  request('/admin/message/send', {
    data,
    params,
  });
  
/**
 * 学生看板
 */
export const dashboard = async (data:any = {}, params: {} = {}) =>
request(`/student/dashboard/index`, {
  data,
  params,
});
/**
 * 模拟考试
 */
export const examPaperSelect = async (data:any = {}, params: {} = {}) =>
request(`/student/exam/paper/select/${data.id}`, {
  data,
  params,
});
/**
 * 试题详情
 */
 export const questionSelect = async (data:any = {}, params: {} = {}) =>
 request(`/admin/question/select/${data.id}`, {
   data,
   params,
 });
 /**
 * 搜索题目
 */
export const educationSearch = async (data: {} = {}) =>
request(`/student/education/search`, {
  data,
  method: 'post',
});
/**
 * 获取首页数据
 */
export const indexStatics = async (params: {} = {}) =>
request(`/student/education/indexStatics`, {
  params,
  method: 'get',
});
/**
 * 答题
 */
export const eduAnswer = async (data: {} = {}) =>
request(`/student/education/answer`, {
  data,
});
/**
 * 反馈题目
 */
export const eduFeedback = async (data: {} = {}) =>
request(`/student/education/feedback`, {
  data,
});
/**
 * 获取答题记录
 */
export const getAnswerRecord = async (data: {} = {}) =>
request(`/student/education/getAnswerRecord`, {
  data,
  method:'post'
});
/**
 * 获取答题记录详情
 */
export const getAnswerRecordDetail = async (data: {} = {}) =>
request(`/student/education/getAnswerRecordDetail`, {
  data,
  method:'post'
});
/**
 * 获取测试记录
 */
export const getExamRecord = async (params: {} = {}) =>
request(`/student/education/getExamRecord`, {
  params,
  method:'get'
});

/**
 * 获取测试记录详情
 */
 export const getExamRecordDetail = async (data: {} = {}) =>
 request(`/student/education/getExamRecordDetail`, {
   data,
   method:'post'
 });

/**
 * 获取题目详情
 */
 export const questionDetail = async (params: {} = {}) =>
 request(`/student/education/questionDetail`, {
   params,
   method:'get'
 });

/**
 * 获取节列表
 */
 export const getChapter = async (params: {} = {}) =>
 request(`/student/education/getChapter`, {
   params,
   method:'get'
 });
/**
 * 生成答题记录
 */
 export const genQuestionRecord = async (data: {} = {}) =>
 request(`/student/education/genQuestionRecord`, {
   data,
   method:'post'
 });
/**
 * 获取答题记录
 */
 export const queryQuestionRecord = async (params: {} = {}) =>
 request(`/student/education/queryQuestionRecord`, {
   params,
   method:'get'
 });
/**
 * 错题本
 */
 export const getWrongBook = async (data: {} = {}) =>
 request(`/student/education/getWrongBook`, {
   data,
   method:'post'
 });
/**
 * 测试记录详情
 */
 export const exampaperRead = async (id) =>
 request(`/student/exampaper/answer/read/${id}`, {
   method:'post'
 });
/**
 * 点击考试
 */
 export const genExamRecord = async (params) =>
 request(`/student/exampaper/answer/genExamRecord`, {
  params,
  method:'get'
 });
/**
 * 模拟测试记录
 */
 export const getAnswerExamRecord = async (data) =>
 request(`/student/exampaper/answer/getExamRecord`, {
  data,
  method:'post'
 });

/**
 * 模拟测试详情
 */
 export const getAnswerExamRecordDetail = async (data) =>
 request(`/student/exampaper/answer/getExamRecordDetail`, {
  data,
  method:'post'
 });

/**
 * 测试答题-提交答案
 */
 export const answerExamSubmit = async (data) =>
 request(`/student/exampaper/answer/examSubmit`, {
  data,
  method:'post'
 });
/**
 * 测试答题-获取答案
 */
 export const queryExamRecord = async (params) =>
 request(`/student/exampaper/answer/queryExamRecord`, {
  params,
  method:'get'
 });
/**
 * 获取某一题题目详情
 */
 export const getQuestionDetailById = async (params) =>
 request(`/student/education/getQuestionDetailById`, {
  params,
  method:'get'
 });
/**
 * 获取题目被答次数和正确率
 */
 export const getQuestionStatics = async (params) =>
 request(`/student/education/getQuestionStatics`, {
  params,
  method:'get'
 });
/**
 * 释放本地
 */
 export const questionRelease = async (params) =>
 request(`/student/education/releaseQuestion`, {
  params,
  method:'get'
 });
 /**
 * 单独答题
 */
  export const alongAnswer = async (data) =>
  request(`/student/education/alongAnswer`, {
   data,
   method:'post'
  });
 
 

 
 
 
 
 

 
 
 







  

 
  